3.1.4 \(\int (d+e x) (a+b \log (c x^n)) \, dx\) [4]

Optimal. Leaf size=48 \[ -b d n x-\frac {1}{4} b e n x^2+d x \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-b*d*n*x-1/4*b*e*n*x^2+d*x*(a+b*ln(c*x^n))+1/2*e*x^2*(a+b*ln(c*x^n))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2350} \begin {gather*} d x \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )-b d n x-\frac {1}{4} b e n x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

-(b*d*n*x) - (b*e*n*x^2)/4 + d*x*(a + b*Log[c*x^n]) + (e*x^2*(a + b*Log[c*x^n]))/2

Rule 2350

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d +
 e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b
, c, d, e, n, r}, x] && IGtQ[q, 0]

Rubi steps

\begin {align*} \int (d+e x) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {1}{2} \left (2 d x+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (d+\frac {e x}{2}\right ) \, dx\\ &=-b d n x-\frac {1}{4} b e n x^2+\frac {1}{2} \left (2 d x+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 55, normalized size = 1.15 \begin {gather*} a d x-b d n x+\frac {1}{2} a e x^2-\frac {1}{4} b e n x^2+b d x \log \left (c x^n\right )+\frac {1}{2} b e x^2 \log \left (c x^n\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

a*d*x - b*d*n*x + (a*e*x^2)/2 - (b*e*n*x^2)/4 + b*d*x*Log[c*x^n] + (b*e*x^2*Log[c*x^n])/2

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 52, normalized size = 1.08

method result size
default \(x a d +\frac {a e \,x^{2}}{2}+x \ln \left (c \,x^{n}\right ) b d -b d n x +\frac {b e \,x^{2} \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )}{2}-\frac {b e n \,x^{2}}{4}\) \(52\)
norman \(\left (-\frac {1}{4} b e n +\frac {1}{2} a e \right ) x^{2}+\left (-b d n +a d \right ) x +b d x \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+\frac {b e \,x^{2} \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )}{2}\) \(54\)
risch \(\frac {b x \left (e x +2 d \right ) \ln \left (x^{n}\right )}{2}-\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}+\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}-\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x}{2}+\frac {i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x}{2}+\frac {i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x}{2}-\frac {i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x}{2}+\frac {\ln \left (c \right ) b e \,x^{2}}{2}-\frac {b e n \,x^{2}}{4}+\ln \left (c \right ) b d x +\frac {a e \,x^{2}}{2}-b d n x +x a d\) \(245\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

x*a*d+1/2*a*e*x^2+x*ln(c*x^n)*b*d-b*d*n*x+1/2*b*e*x^2*ln(c*exp(n*ln(x)))-1/4*b*e*n*x^2

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 52, normalized size = 1.08 \begin {gather*} -\frac {1}{4} \, b n x^{2} e + \frac {1}{2} \, b x^{2} e \log \left (c x^{n}\right ) - b d n x + \frac {1}{2} \, a x^{2} e + b d x \log \left (c x^{n}\right ) + a d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/4*b*n*x^2*e + 1/2*b*x^2*e*log(c*x^n) - b*d*n*x + 1/2*a*x^2*e + b*d*x*log(c*x^n) + a*d*x

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 63, normalized size = 1.31 \begin {gather*} -\frac {1}{4} \, {\left (b n - 2 \, a\right )} x^{2} e - {\left (b d n - a d\right )} x + \frac {1}{2} \, {\left (b x^{2} e + 2 \, b d x\right )} \log \left (c\right ) + \frac {1}{2} \, {\left (b n x^{2} e + 2 \, b d n x\right )} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

-1/4*(b*n - 2*a)*x^2*e - (b*d*n - a*d)*x + 1/2*(b*x^2*e + 2*b*d*x)*log(c) + 1/2*(b*n*x^2*e + 2*b*d*n*x)*log(x)

________________________________________________________________________________________

Sympy [A]
time = 0.13, size = 56, normalized size = 1.17 \begin {gather*} a d x + \frac {a e x^{2}}{2} - b d n x + b d x \log {\left (c x^{n} \right )} - \frac {b e n x^{2}}{4} + \frac {b e x^{2} \log {\left (c x^{n} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n)),x)

[Out]

a*d*x + a*e*x**2/2 - b*d*n*x + b*d*x*log(c*x**n) - b*e*n*x**2/4 + b*e*x**2*log(c*x**n)/2

________________________________________________________________________________________

Giac [A]
time = 2.08, size = 62, normalized size = 1.29 \begin {gather*} \frac {1}{2} \, b n x^{2} e \log \left (x\right ) - \frac {1}{4} \, b n x^{2} e + \frac {1}{2} \, b x^{2} e \log \left (c\right ) + b d n x \log \left (x\right ) - b d n x + \frac {1}{2} \, a x^{2} e + b d x \log \left (c\right ) + a d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/2*b*n*x^2*e*log(x) - 1/4*b*n*x^2*e + 1/2*b*x^2*e*log(c) + b*d*n*x*log(x) - b*d*n*x + 1/2*a*x^2*e + b*d*x*log
(c) + a*d*x

________________________________________________________________________________________

Mupad [B]
time = 3.61, size = 43, normalized size = 0.90 \begin {gather*} \ln \left (c\,x^n\right )\,\left (\frac {b\,e\,x^2}{2}+b\,d\,x\right )+d\,x\,\left (a-b\,n\right )+\frac {e\,x^2\,\left (2\,a-b\,n\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))*(d + e*x),x)

[Out]

log(c*x^n)*(b*d*x + (b*e*x^2)/2) + d*x*(a - b*n) + (e*x^2*(2*a - b*n))/4

________________________________________________________________________________________